/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Acer
 */
@Entity
@Table(name = "tb_Flight", catalog = "East2West_TourAndTravel", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "TbFlight.findAll", query = "SELECT t FROM TbFlight t"),
    @NamedQuery(name = "TbFlight.findByFID", query = "SELECT t FROM TbFlight t WHERE t.fID = :fID"),
    @NamedQuery(name = "TbFlight.findByFName", query = "SELECT t FROM TbFlight t WHERE t.fName = :fName"),
    @NamedQuery(name = "TbFlight.findByFPrice", query = "SELECT t FROM TbFlight t WHERE t.fPrice = :fPrice"),
    @NamedQuery(name = "TbFlight.findByFGo", query = "SELECT t FROM TbFlight t WHERE t.fGo = :fGo"),
    @NamedQuery(name = "TbFlight.findByFTo", query = "SELECT t FROM TbFlight t WHERE t.fTo = :fTo")})
public class TbFlight implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "f_ID", nullable = false)
    private Integer fID;
    @Column(name = "f_Name", length = 50)
    private String fName;
    @Column(name = "f_Price", precision = 53)
    private Double fPrice;
    @Column(name = "f_Go", length = 50)
    private String fGo;
    @Column(name = "f_To", length = 50)
    private String fTo;

    public TbFlight() {
    }

    public TbFlight(Integer fID) {
        this.fID = fID;
    }

    public Integer getFID() {
        return fID;
    }

    public void setFID(Integer fID) {
        this.fID = fID;
    }

    public String getFName() {
        return fName;
    }

    public void setFName(String fName) {
        this.fName = fName;
    }

    public Double getFPrice() {
        return fPrice;
    }

    public void setFPrice(Double fPrice) {
        this.fPrice = fPrice;
    }

    public String getFGo() {
        return fGo;
    }

    public void setFGo(String fGo) {
        this.fGo = fGo;
    }

    public String getFTo() {
        return fTo;
    }

    public void setFTo(String fTo) {
        this.fTo = fTo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fID != null ? fID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbFlight)) {
            return false;
        }
        TbFlight other = (TbFlight) object;
        if ((this.fID == null && other.fID != null) || (this.fID != null && !this.fID.equals(other.fID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.TbFlight[fID=" + fID + "]";
    }

}
